home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Resources / System / BoingBag1 / Contributions / InstallerNG / GUI-API / example / igui_GetNextEntry.c < prev    next >
C/C++ Source or Header  |  1999-10-28  |  1KB  |  59 lines

  1.  
  2. #include "includes.h"
  3. #include "installergui_data.h"
  4.  
  5. /********************************************************************
  6.  *
  7.  *  DESCRIPTION
  8.  *
  9.  */
  10.  
  11. /********************************************************************
  12.  *
  13.  *  STATIC
  14.  *
  15.  */
  16.  
  17. /********************************************************************
  18.  *
  19.  *  EXTERN
  20.  *
  21.  */
  22.  
  23. /********************************************************************
  24.  *
  25.  *  PUBLIC
  26.  *
  27.  */
  28.  
  29. /********************************************************************
  30.  *
  31.  *  CODE
  32.  *
  33.  */
  34.  
  35. char * __asm igui_GetNextEntry(register __a0 APTR application)
  36. {
  37.   #ifdef DEBUG
  38.   DEBUG_MAKRO
  39.   #endif
  40.  
  41.   {
  42.     struct Application *app = (struct Application *) application;
  43.     struct FileInfoBlock *fib;
  44.  
  45.     // get the next active list entry
  46.     DoMethod(app->app_DirlistList, MUIM_List_NextSelected, &app->app_DirlistWalker);
  47.  
  48.     // return NULL, if the end of the list was reached
  49.     if (app->app_DirlistWalker == MUIV_List_NextSelected_End) { return(NULL); }
  50.  
  51.     //  otherwise get the currently active list entry
  52.     else
  53.     {
  54.       DoMethod(app->app_DirlistList, MUIM_List_GetEntry, app->app_DirlistWalker, &fib);
  55.       return((char *) &(fib -> fib_FileName));
  56.     }
  57.   }
  58. }
  59.